package com.lhh.userservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhh.springcommon.entity.Follow;
import com.lhh.springcommon.entity.vo.UserVO;
import com.lhh.springcommon.utils.PageQuery;
import org.springframework.stereotype.Service;

/**
 * @author 李厚航
 * @date 2025-03-01 22:02
 */
public interface UserFollowService {

    /**
     * 查询用户关注数
     * @param uid
     * @param fid
     * @return
     */
    Long countFollow(Integer uid,Integer fid);

    /**
     * 查询用户粉丝数
     * @return
     */
    Long countFans();

    /**
     * 查询粉丝信息
     * @param page
     * @param pageSize
     * @param uid
     * @param fid
     * @return
     */
    Page<UserVO> queryPageFans(Integer page,Integer pageSize,Integer uid,Integer fid);


    /**
     * 关注或取消关注
     * @param follow
     * @return
     */
    Boolean addOrDeleteFollow(Follow follow);

    /**
     * 查询关注信息
     * @param page
     * @param pageSize
     * @param uid
     * @param fid
     * @return
     */
    Page<UserVO> queryPageFollow(Integer page,Integer pageSize,Integer uid,Integer fid);

    /**
     * 判断是否关注
     * @param fid
     * @return
     */
    Boolean isFollow(Integer uid,Integer fid);
}
